package com.whfc.common.enums;

/**
 * @Description:
 * @author: xugcheng
 * @version: 1.0
 * @date: 2019/8/1 11:01
 */
public enum Gender {

    unknown(0, "未知"),

    man(1, "男"),

    woman(2, "女");

    private Integer value;

    private String desc;

    Gender(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public Integer getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    public static String parseValue(Integer value) {
        switch (value) {
            case 1:
                return man.desc;
            case 2:
                return woman.desc;
            default:
                return unknown.desc;
        }
    }
}
